# # -*- coding: UTF-8 -*-
# # @Date ：2024/7/4 16:21
# # @File：models
# # @Author：mmmme
# # @IDE：PyCharm
#
#
# from sqlalchemy import create_engine, Column, Integer, String, Text
# from sqlalchemy.ext.declarative import declarative_base
#
# Base = declarative_base()
# metadata = Base.metadata
#
#
# class risk_analysis_unit(Base):
#     __tablename__ = 'risk_analysis_unit'
#     __table_args__ = {'comment': '安全风险分析单元'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class risk_event(Base):
#     __tablename__ = 'risk_event'
#     __table_args__ = {'comment': '安全风险事件'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class risk_control_measures(Base):
#     __tablename__ = 'risk_control_measures'
#     __table_args__ = {'comment': '安全风险管控措施'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class hazard_detection_task(Base):
#     __tablename__ = 'hazard_detection_task'
#     __table_args__ = {'comment': '隐患排查任务'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class hazard_detection_record(Base):
#     __tablename__ = 'hazard_detection_record'
#     __table_args__ = {'comment': '隐患排查记录'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class hazard_detection_information(Base):
#     __tablename__ = 'hazard_detection_information'
#     __table_args__ = {'comment': '隐患排查信息'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class job_ticket_information(Base):
#     __tablename__ = 'job_ticket_information'
#     __table_args__ = {'comment': '特殊作业票证信息'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
#
#
# class person_real_time_location(Base):
#     __tablename__ = 'person_real_time_location'
#     __table_args__ = {'comment': '人员实时定位'}
#     id = Column(String, primary_key=True)
#     companyName = Column(String)
#     companyCode = Column(String)
#     data = Column(Text)
#
#     def to_dict(self):
#         return {i.name: getattr(self, i.name) for i in self.__table__.columns}
